﻿using System;
using System.Collections.Generic;

using System.Text;
using iAnywhere.Data.AsaClient;


namespace ScriptifyLibrary20
{
    public class ScriptifySybaseAnywhere : IScriptifyDataAccess
    {
        #region IScriptifyDataAccess Members

        public List<string> GetServers()
        {
            throw new NotImplementedException();
        }

        public List<string> GetDatabases(ScriptifyServer server, IProgressBar bar)
        {
            throw new NotImplementedException();
        }

        public List<ScriptifyObject> GetObjects(ScriptifyServer server, IProgressBar bar)
        {
            AsaConnection asac = GetAsaConnection(server);
            asac.Open();
            return null;
        }

        public StringBuilder ScriptDatabase(ScriptifyServer server, ScriptifyOptions options, List<ScriptifyObject> objects, IProgressBar bar)
        {
            throw new NotImplementedException();
        }

        #endregion

        private static AsaConnection GetAsaConnection(ScriptifyServer server)
        {
            return new AsaConnection("Data Source='" + server.serverName + "';Port="+ server.port +";UID='"+ server.username + "';PWD='" + server.password + "';Database='"+server.databaseName +"';" );

        }

    }
}
